package com.nwpu.coursesupport.entity;

import java.util.ArrayList;
import java.util.Date;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.nwpu.coursesupport.entity.bean.BaseEntity;
import com.nwpu.coursesupport.enumeration.ClassType;

public class Class extends BaseEntity{
	
    private String name;
    private Integer fid;
    private Integer courseId;
    private Course course;
    private int managerId;
    private String managerName;
    private ClassType classType;
    private Integer hasTheory;
    @JsonIgnore
    private String theoryDateBytes;
    private ClassDate theoryDate;
    private Integer hasLab;
    @JsonIgnore
    private String labDateBytes;
    private ClassDate labDate;
    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
    private Date createDate;
    private Integer createId;
    
    private String classCode;
    
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public Integer getFid() {
		return fid;
	}
	public void setFid(Integer fid) {
		this.fid = fid;
	}
	public Integer getCourseId() {
		return courseId;
	}
	public void setCourseId(Integer courseId) {
		this.courseId = courseId;
	}
	public Course getCourse() {
		return course;
	}
	public void setCourse(Course course) {
		this.course = course;
	}
	public Integer getHasTheory() {
		return hasTheory;
	}
	public void setHasTheory(Integer hasTheory) {
		this.hasTheory = hasTheory;
	}
	public ClassDate getTheoryDate() {
		return theoryDate;
	}
	public void setTheoryDate(ClassDate theoryDate) {
		this.theoryDate = theoryDate;
	}
	
	public Integer getHasLab() {
		return hasLab;
	}
	public void setHasLab(Integer hasLab) {
		this.hasLab = hasLab;
	}
	public ClassDate getLabDate() {
		return labDate;
	}
	public void setLabDate(ClassDate labDate) {
		this.labDate = labDate;
	}
	public Date getCreateDate() {
		return createDate;
	}
	public void setCreateDate(Date createDate) {
		this.createDate = createDate;
	}
	public Integer getCreateId() {
		return createId;
	}
	public void setCreateId(Integer createId) {
		this.createId = createId;
	}
	public ClassType getClassType() {
		return classType;
	}
	public void setClassType(ClassType classType) {
		this.classType = classType;
	}
	public int getManagerId() {
		return managerId;
	}
	public void setManagerId(int managerId) {
		this.managerId = managerId;
	}
	public String getManagerName() {
		return managerName;
	}
	public void setManagerName(String managerName) {
		this.managerName = managerName;
	}
	public String getTheoryDateBytes() {
		return theoryDateBytes;
	}
	public void setTheoryDateBytes(String theoryDateBytes) {
		this.theoryDateBytes = theoryDateBytes;
	}
	public String getLabDateBytes() {
		return labDateBytes;
	}
	public void setLabDateBytes(String labDateBytes) {
		this.labDateBytes = labDateBytes;
	}

	public String getClassCode() {
		return classCode;
	}
	public void setClassCode(String classCode) {
		this.classCode = classCode;
	}




	public static class ClassDate {
		private int timeOfWeek;
		private int sumWeeks;
		ArrayList<DateItem> date;
		public int getTimeOfWeek() {
			return timeOfWeek;
		}
		public void setTimeOfWeek(int timeOfWeek) {
			this.timeOfWeek = timeOfWeek;
		}
		public int getSumWeeks() {
			return sumWeeks;
		}
		public void setSumWeeks(int sumWeeks) {
			this.sumWeeks = sumWeeks;
		}
		public ArrayList<DateItem> getDate() {
			return date;
		}
		public void setDate(ArrayList<DateItem> date) {
			this.date = date;
		}
		
	}
	public static class DateItem{
	    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm")
		private Date begin;
	    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm")
	    private Date end;
	    
	    private String location;
	    
		public Date getBegin() {
			return begin;
		}
		public void setBegin(Date begin) {
			this.begin = begin;
		}
		public Date getEnd() {
			return end;
		}
		public void setEnd(Date end) {
			this.end = end;
		}
		public String getLocation() {
			return location;
		}
		public void setLocation(String location) {
			this.location = location;
		}
		
	}
}



